package com.acsior.hibernate.vo;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.acsior.dac.impl.hibernate.vo.GeneratorKey;

/**
 * Postman entity. @author MyEclipse Persistence Tools <b><i>powered by
 * Belev</i></b>
 */
@Entity
@Table(name = "postmen")
@GeneratorKey(tableName = "customers")
public class PostmanVO extends CustomerVO {

	private static final long serialVersionUID = 5670020734927391208L;

	@Column(name = "active", nullable = false)
	private boolean active;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "structure_id", nullable = false)
	private StructureVO structure;

	/** default constructor */
	public PostmanVO() {
		super();
	}

	/** @return the structure */
	public StructureVO getStructure() {
		return this.structure;
	}

	/** @return the active */
	public boolean isActive() {
		return this.active;
	}

	/** @param active */
	public void setActive(boolean active) {
		this.active = active;
	}

	/** @param structure */
	public void setStructure(StructureVO structure) {
		this.structure = structure;
	}

}